package addon.w3.w3x;

public class W3XPathMapCheck {
	W3XPathMap pathMap;
	
	byte currPosData = 0x00;
	
	float xScal = 1.0f, yScal = 1.0f;
	
	public W3XPathMapCheck(W3XPathMap pathMap) {
		this.pathMap = pathMap;
	}
	
	public void setPosition(int x,int y) {
		
	}
	
	public void setScale(float x, float y) {
		this.xScal = x;
		this.yScal = y;
	}
	
	public boolean isWalkable() {
		if( (currPosData & 0x02) == 0x02) return false;
		else return true;
	}
	
	public boolean isFlyable() {
		if( (currPosData & 0x04) == 0x04) return false;
		else return true;
	}
	
	public boolean isBuildable() {
		if( (currPosData & 0x08) == 0x08) return false;
		else return true;
	}
	
	//second type
	public boolean isBlight() {
		if( (currPosData & 0x20) == 0x20) return true;
		else return false;
	}
	
	public boolean isWater() {
		if( (currPosData & 0x20) == 0x20) return false;
		else return true;
	}
	
	public boolean isUnk() {
		if( (currPosData & 0x20) == 0x20) return true;
		else return false;
	}
	
	/**
	Header:
	char[4]: file ID = 'MP3W'
	int: file version = 0
	int: path map width (=map_width*4)
	int: path map height (=map_height*4)
	
	Data:
	Each byte of the data part is a part of a tileset exactly like for the TGA.
	Data size: (map_height*4)*(map_with*4) bytes
	Flags table:
	0x01: 0 (unused)
	0x02: 1=no walk, 0=walk ok
	0x04: 1=no fly, 0=fly ok
	0x08: 1=no build, 0=build ok
	0x10: 0 (unused)
	0x20: 1=blight, 0=normal
	0x40: 1=no water, 0=water
	0x80: 1=unknown, 0=normal
	
	Exmaple:
	value: use:
	00 bridge doodad
	08 shallow water
	0A deep water
	40 normal ground
	48 water ramp, unbuildable grounds, unbuildable parts of doodads
	CA cliff edges, solid parts of doodads (no build and no walk)
	CE edges of the map (boundaries)
	 */
}
